package com.chance.cc.crawler.prod.command.trigger.domain.vm.xcar.realtime;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.xcar.realtime.XcarSeriesVideoRealtimeCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @ClassName song
 * @Description TODO
 * @Author ding
 * @Date 2021/8/29 10:41
 * @Version 1.0
 * 爱卡 车 系  视频信息采集
 **/
public class XcarSeriesVideoScheduleTrigger extends CommonCrawlerSchedulerTrigger {
    public static void main(String[] args) {
        XcarSeriesVideoScheduleTriggerInfo();
       // XcarSeriesVideoScheduleTriggerInfoTest();//测试

    }

    public static void XcarSeriesVideoScheduleTriggerInfoTest(){
        CrawlerJob crawlerJob = XcarSeriesVideoRealtimeCrawlerScheduleJob.xcarCwalerJob();
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                XcarSeriesVideoRealtimeCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "爱卡汽车页车系文章 测试");
        System.out.println("添加采集调度： "+page.getRawText());
    }

    public static void XcarSeriesVideoScheduleTriggerInfo(){
        CrawlerJob crawlerJob = XcarSeriesVideoRealtimeCrawlerScheduleJob.xcarCwalerJob();
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                XcarSeriesVideoRealtimeCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 3 * * ?",
                "爱卡汽车车系页文章每天3点定时采集");//TODO 具体采集时间未定
        System.out.println("添加采集调度： "+page.getRawText());
    }
}
